home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / System7 tools / Frontier / Frontier SDK 2.1 / Toolkits / IAC Tools / iacnewsystemverb.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-20  |  997 b   |  44 lines  |  [TEXT/KAHL]

  1. /*© Copyright 1988-1992 UserLand Software, Inc.  All Rights Reserved.*/
  2.  
  3. #include "iacinternal.h"
  4.  
  5.  
  6. /*
  7. 8/24/92 DW: This is the only system event verb that UCMDs need as of Frontier
  8. SDK 2.0. We included this in a separate file so that UCMDs don't have to have all
  9. the overhead of all the routines in iacsysevents.c.
  10. */
  11.  
  12.  
  13. Boolean IACnewsystemverb (OSType vclass, OSType vtoken, AppleEvent *event) {
  14.  
  15.     /*
  16.     6/29/92 DW: special entry point for messages sent to system event handlers.
  17.     
  18.     implementation detail: this is accomplished by sending the message to ourself.
  19.     */
  20.     
  21.     AEAddressDesc adr; 
  22.     OSErr errcode;
  23.     
  24.     ProcessSerialNumber psn;
  25.  
  26.     psn.highLongOfPSN = 0;
  27.  
  28.     psn.lowLongOfPSN = kCurrentProcess;
  29.  
  30.     AECreateDesc (typeProcessSerialNumber, (Ptr) &psn, sizeof (psn), &adr);
  31.     
  32.     errcode = AECreateAppleEvent (
  33.         
  34.         vclass, vtoken, &adr, kAutoGenerateReturnID, kAnyTransactionID, event);
  35.     
  36.     AEDisposeDesc (&adr);
  37.  
  38.     IACglobals.errorcode = errcode;
  39.     
  40.     return (errcode == noErr);
  41.     } /*IACnewsystemverb*/
  42.     
  43.     
  44.